package com.szh.zx.gaoDingJavaBook.yitu.two;

public class TestThread2 {
	public static void main(String[] args) {
		Student s1 = new Student("ss",12,"武器1");
		Student s2 = new Student("ss1",12,"武器1");
		Student s3 = new Student("ss2",12,"武器1");
		s1.start();
		s2.start();
		s3.start();
		System.out.println(Thread.activeCount());
	}
}
class Student extends Thread{
	String name;
	int age;
	String blood;
	public Student(String name,int age,String blood ){
		this.name =name;
		this.age = age;
		this.blood = blood;
	}

	@Override
	public void run() {
		for (int i = 0; i < age; i++) {
			System.out.println("我叫"+name+"年龄"+age+"武器"+blood);
		}
	}
}